import pandas as pd
books = pd.read_csv('C:/Kaggle/books.csv', skiprows=[4011, 5687, 7055, 10600, 10667])
books.head()
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Harry Potter and the Half-Blood Prince (Harry ... | J.K. Rowling-Mary GrandPré | 4.56 | 439785960 | 9.780440e+12 | eng | 652 | 1944099 | 26249 |
| 1 | 2 | Harry Potter and the Order of the Phoenix (Har... | J.K. Rowling-Mary GrandPré | 4.49 | 439358078 | 9.780440e+12 | eng | 870 | 1996446 | 27613 |
| 2 | 3 | Harry Potter and the Sorcerer's Stone (Harry P... | J.K. Rowling-Mary GrandPré | 4.47 | 439554934 | 9.780440e+12 | eng | 320 | 5629932 | 70390 |
| 3 | 4 | Harry Potter and the Chamber of Secrets (Harry... | J.K. Rowling | 4.41 | 439554896 | 9.780440e+12 | eng | 352 | 6267 | 272 |
| 4 | 5 | Harry Potter and the Prisoner of Azkaban (Harr... | J.K. Rowling-Mary GrandPré | 4.55 | 043965548X | 9.780440e+12 | eng | 435 | 2149872 | 33964 |
highest_rated_author=books.groupby('authors',as_index=False)['average_rating'].mean().rename(index=str, columns={0: "auth_avg"})
highest_rated_author
| authors | average_rating | |
|---|---|---|
| 0 | A.B. Yehoshua-Hillel Halkin | 3.585000 |
| 1 | A.D.P. Briggs-Leo Tolstoy-Fyodor Dostoyevsky | 3.760000 |
| 2 | A.E. Cunningham-Harlan Ellison-Charles F. Mill... | 4.150000 |
| 3 | A.J. Jacobs | 3.770000 |
| 4 | A.M. Homes | 3.455000 |
| 5 | A.N. Roquelaure-Anne Rice | 3.644000 |
| 6 | A.S. Byatt | 3.770000 |
| 7 | A.S. Byatt-Jean-Louis Chevalier | 3.890000 |
| 8 | Aaron Allston | 3.935000 |
| 9 | Aaron Rosenberg-Christopher Cook | 5.000000 |
| 10 | Abbie Hoffman-Anita Hoffman | 3.930000 |
| 11 | Abdul Rahman Munif-Peter Theroux-Abdelrahman M... | 4.100000 |
| 12 | Abigail Adams-Frank Shuffelton | 4.170000 |
| 13 | Abigail Beckel-Kathleen Rooney-Chip Cheek-Amy ... | 4.380000 |
| 14 | Abigail Thomas | 3.730000 |
| 15 | Abolqasem Ferdowsi-Dick Davis-Azar Nafisi | 4.520000 |
| 16 | Abraham Lincoln-Bob Blaisdell | 4.140000 |
| 17 | Abraham Lincoln-Don E. Fehrenbacher | 4.370000 |
| 18 | Abraham Lincoln-Gore Vidal | 4.230000 |
| 19 | Abraham Lincoln-Michael McCurdy | 4.530000 |
| 20 | Adam Sexton-G. Tubach | 3.500000 |
| 21 | Adam Drozdek | 3.710000 |
| 22 | Adam Ginsberg | 3.490000 |
| 23 | Adam Gopnik | 3.760000 |
| 24 | Adam Gopnik-Omar Rayyan | 3.620000 |
| 25 | Adam Hochschild | 4.233333 |
| 26 | Adam Mansbach | 3.550000 |
| 27 | Adam Rex | 4.210000 |
| 28 | Adam Smith | 3.890000 |
| 29 | Adam Smith-Robert B. Reich | 3.890000 |
| ... | ... | ... |
| 7570 | Zadie Smith-Ana MarÃa de la Fuente | 3.760000 |
| 7571 | Zadie Smith-David Mitchell-George Saunders-Col... | 3.390000 |
| 7572 | Zadie Smith-Ulrike Wasel-Klaus Timmermann | 3.760000 |
| 7573 | Zak Smith-Steve Erickson | 4.100000 |
| 7574 | Zecharia Sitchin | 4.060000 |
| 7575 | Zilpha Keatley Snyder | 3.890000 |
| 7576 | Zilpha Keatley Snyder-Alton Raible | 4.090000 |
| 7577 | Zlata Filipović-Janine Di Giovanni-Christina P... | 3.740000 |
| 7578 | Zolar | 3.670000 |
| 7579 | Zora Neale Hurston | 3.956667 |
| 7580 | Zora Neale Hurston-Carla Kaplan-John Edgar Wid... | 3.980000 |
| 7581 | Zora Neale Hurston-Cheryl A. Wall | 4.370000 |
| 7582 | Zora Neale Hurston-Henry Louis Gates Jr.-Siegl... | 4.250000 |
| 7583 | Zora Neale Hurston-Michele-Denise Woods | 3.900000 |
| 7584 | Zora Neale Hurston-Ruby Dee | 3.900000 |
| 7585 | Zoë Heller | 3.710000 |
| 7586 | bell hooks | 4.230000 |
| 7587 | bell hooks-Shane W. Evans | 4.190000 |
| 7588 | Ã…sne Seierstad | 3.770000 |
| 7589 | Ã…sne Seierstad-Grete Skevik | 3.770000 |
| 7590 | Ã…sne Seierstad-Ingrid Christopherson | 3.770000 |
| 7591 | Émile Zola-Andrew Moore-Ernest Alfred Vizetelly | 3.690000 |
| 7592 | Émile Zola-Douglas Parmée | 4.080000 |
| 7593 | Émile Zola-Ernest Alfred Vizetelly | 3.880000 |
| 7594 | Émile Zola-Ernest Alfred Vizetelly-Henry Vizet... | 3.900000 |
| 7595 | Émile Zola-Henri Mitterand | 4.050000 |
| 7596 | Émile Zola-Robert Lethbridge-Elinor Dorday | 3.990000 |
| 7597 | Émile Zola-Robin Buss-Brian Nelson | 3.990000 |
| 7598 | Émile Zola-Roger Pearson | 4.040000 |
| 7599 | Éric-Emmanuel Schmitt | 3.500000 |
7600 rows × 2 columns
highest_rated_author.sort_values(by='average_rating', ascending=False)
| authors | average_rating | |
|---|---|---|
| 3379 | Jean-Paul Gabilliet-François Gallix-Janice Fia... | 5.000 |
| 6453 | Sheri Rose Shepherd | 5.000 |
| 2901 | Ian Martin-Katie Elliott | 5.000 |
| 6245 | Ross Garnaut | 5.000 |
| 5277 | Nicholas Evans-Rhonda Evans | 5.000 |
| 3922 | Julie Sylvester-David Sylvester | 5.000 |
| 3564 | John Diamond | 5.000 |
| 1101 | Chris Jiggins-Pablo Andrade-Eduardo Cueva | 5.000 |
| 4202 | Laura Driscoll-Alisa Klayman-Grodsky-Eric ... | 5.000 |
| 1087 | Chris Green-Chris Wright-Paul Douglas Gardner | 5.000 |
| 6350 | Sara Barton-Wood | 5.000 |
| 9 | Aaron Rosenberg-Christopher Cook | 5.000 |
| 5780 | R. McL. Wilson | 5.000 |
| 5066 | Middlesex Borough Heritage Committee | 5.000 |
| 1574 | Dennis Adler-R.L. Wilson | 5.000 |
| 7029 | Todd Davis-Marc Frey | 5.000 |
| 3143 | James E. Campbell | 5.000 |
| 3144 | James E. Ingram-Lori Grove | 5.000 |
| 471 | Aristophanes-F.W. Hall-W.M. Geldart | 5.000 |
| 6803 | Svetlana Alpers | 5.000 |
| 6495 | Simon Cleveland | 4.910 |
| 210 | Alice Wong-Lena Tabori | 4.880 |
| 5164 | NOT A BOOK | 4.875 |
| 5741 | Plato-John Burnet-Hipparchus | 4.870 |
| 5545 | Paul Foster Case | 4.800 |
| 2731 | Henry David Thoreau-Barry M. Andrews | 4.750 |
| 1623 | Don Macmillan-Wayne G. Broehl Jr. | 4.750 |
| 7529 | Xavier de C.-Xavier de C.-Joseph Rowe | 4.750 |
| 1856 | Elena N. Mahlow | 4.750 |
| 6388 | Saul Leiter-Martin Harrison | 4.730 |
| ... | ... | ... |
| 7106 | United Feature Syndication | 0.000 |
| 4001 | Kate Atkinson-Roddy Doyle-Ruth Rendell | 0.000 |
| 5481 | Paolo Mazzarello | 0.000 |
| 5610 | Pete Townsend | 0.000 |
| 1675 | Doug Walsh | 0.000 |
| 5401 | Open City Magazine-James Purdy-Daniel Pinchbec... | 0.000 |
| 2168 | Frank N. Magill | 0.000 |
| 7297 | Warren G. Bennis | 0.000 |
| 6742 | Stuart Mitchner | 0.000 |
| 2357 | Georg Wilhelm Friedrich Hegel-Michael John Petry | 0.000 |
| 5612 | Peter Dale-Ian Hamilton-Anthony Thwaite | 0.000 |
| 1612 | Dobrica Erić | 0.000 |
| 6522 | SofÃa Irene Cardona | 0.000 |
| 1286 | Dan Hitt-James Beckett III | 0.000 |
| 1394 | David Ward-Parveen Adams-Seamus Heaney-Ivan ... | 0.000 |
| 3001 | J. Martin Evans | 0.000 |
| 5996 | Rick Osborne-Kevin Miller | 0.000 |
| 6044 | Robert A. Weiss-Margaret A. Weiss-Karen L. Bea... | 0.000 |
| 284 | Andrew Hunt | 0.000 |
| 3137 | James Craig Holte | 0.000 |
| 3322 | Jasmine C.M. Luk-Angel M.Y. Lin | 0.000 |
| 3335 | Jay Parini-August Wilson | 0.000 |
| 6813 | Sylvia Moody-Gay Gallsworthy | 0.000 |
| 697 | Better Homes and Gardens | 0.000 |
| 680 | Bernard Murchland | 0.000 |
| 4399 | Lonely Planet-Mark Honan | 0.000 |
| 3727 | John Weld-Phil Interlandi | 0.000 |
| 454 | Apollodorus-Richard Wagner | 0.000 |
| 6465 | Shiro Kobayashi-David L. Kaplan-Helmut Ritter | 0.000 |
| 2504 | Graham Handley | 0.000 |
7600 rows × 2 columns
most_popular_books=books.sort_values(by='ratings_count',ascending=False)
most_popular_books.head()
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | Harry Potter and the Sorcerer's Stone (Harry P... | J.K. Rowling-Mary GrandPré | 4.47 | 439554934 | 9.780440e+12 | eng | 320 | 5629932 | 70390 |
| 12243 | 41865 | Twilight (Twilight #1) | Stephenie Meyer | 3.59 | 316015849 | 9.780320e+12 | eng | 498 | 4367341 | 93619 |
| 2000 | 5907 | The Hobbit or There and Back Again | J.R.R. Tolkien | 4.26 | 618260307 | 9.780620e+12 | eng | 366 | 2364968 | 31664 |
| 1717 | 5107 | The Catcher in the Rye | J.D. Salinger | 3.80 | 316769177 | 9.780320e+12 | eng | 277 | 2318478 | 42016 |
| 340 | 960 | Angels & Demons (Robert Langdon #1) | Dan Brown | 3.88 | 1416524797 | 9.781420e+12 | eng | 736 | 2279854 | 20851 |
most_popular_books.tail()
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 10542 | 34320 | Operation Spy School (Adam Sharp #4) | George E. Stanley-Guy Francis | 3.65 | 375824049 | 9.780380e+12 | eng | 44 | 0 | 0 |
| 12955 | 44705 | The Leadership Challenge: Skills for Taking Ch... | Warren G. Bennis | 0.00 | 088684049X | 9.780890e+12 | eng | 60 | 0 | 0 |
| 1122 | 3351 | Open City 6: The Only Woman He Ever Left | Open City Magazine-James Purdy-Daniel Pinchbec... | 0.00 | 189044717X | 9.781890e+12 | eng | 200 | 0 | 0 |
| 3744 | 11516 | Les Larmes d'Icare | Dan Simmons-Jean-Daniel Brèque | 3.56 | 220724038X | 9.782210e+12 | fre | 357 | 0 | 0 |
| 12014 | 41044 | Day and Night | Better Homes and Gardens | 0.00 | 696018829 | 9.780700e+12 | eng | 32 | 0 | 1 |
good_books_read_rarely=books[(books.ratings_count <100) & (books.average_rating>=4) ]
good_books_read_rarely.head()
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 35 | 54 | Molly Hatchet - 5 of the Best | Molly Hatchet | 4.33 | 1575606240 | 9.781580e+12 | eng | 56 | 6 | 0 |
| 47 | 72 | Artesia: Adventures in the Known World | Mark Smylie | 4.16 | 1932386106 | 9.781930e+12 | eng | 352 | 50 | 4 |
| 66 | 96 | There's Always Enough: The Miraculous Move of ... | Rolland Baker-Heidi Baker | 4.45 | 1852402873 | 9.781850e+12 | eng | 192 | 34 | 6 |
| 79 | 123 | The Power of One (The Power of One #1) | Bryce Courtenay | 4.35 | 385732546 | 9.780390e+12 | eng | 291 | 44 | 12 |
| 80 | 129 | The Power of One: One Person One Rule One Month | John C. Maxwell-Stephen R. Graves-Thomas G. Ad... | 4.28 | 785260056 | 9.780790e+12 | en-US | 256 | 16 | 1 |
popular_books_rated_poorly=books[(books.ratings_count >10000) & (books.average_rating<3) ]
popular_books_rated_poorly
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 2198 | 6613 | Four Blondes | Candace Bushnell | 2.82 | 080213825X | 9.780800e+12 | eng | 256 | 23143 | 877 |
| 7985 | 24929 | Lost | Gregory Maguire-Douglas Smith | 2.81 | 60988649 | 9.780060e+12 | eng | 340 | 13014 | 892 |
scientist_writer=books[(books.authors == "Stephen Hawking")| (books.authors == "Brian Greene")| (books.authors == "Michio Kaku")]
from IPython.display import Image,display
listOfImageNames = ['C:\Kaggle\Stephen_Hawking.StarChild.jpg',
'C:\Kaggle\Brian_Greene.jpg',
'C:\Kaggle\Michio_Kaku.jpg']
for imageName in listOfImageNames:
display(Image(filename=imageName))
scientist_writer
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 284 | 771 | The Elegant Universe: Superstrings Hidden Dim... | Brian Greene | 4.07 | 375708111 | 9.780380e+12 | eng | 425 | 32578 | 1069 |
| 726 | 2093 | The Illustrated A Brief History of Time | Stephen Hawking | 4.16 | 553103741 | 9.780550e+12 | eng | 256 | 750 | 58 |
| 728 | 2095 | The Universe in a Nutshell | Stephen Hawking | 4.15 | 055380202X | 9.780550e+12 | eng | 216 | 27792 | 615 |
| 729 | 2096 | God Created the Integers: The Mathematical Bre... | Stephen Hawking | 4.06 | 762419229 | 9.780760e+12 | eng | 1160 | 1650 | 50 |
| 1324 | 3869 | A Brief History of Time | Stephen Hawking | 4.16 | 553380168 | 9.780550e+12 | eng | 212 | 214520 | 5300 |
| 4925 | 14700 | El Universo Elegante: Supercuerdas Dimensione... | Brian Greene | 4.07 | 8484322645 | 9.788480e+12 | spa | 472 | 34 | 1 |
| 5838 | 17354 | A Brief History of Time | Stephen Hawking | 4.16 | 593043162 | 9.780590e+12 | en-GB | 241 | 222 | 12 |
| 5839 | 17355 | The Illustrated A Brief History of Time | Stephen Hawking | 4.16 | 593040597 | 9.780590e+12 | eng | 259 | 307 | 38 |
| 7181 | 22434 | The Fabric of the Cosmos: Space Time and the ... | Brian Greene | 4.12 | 141011114 | 9.780140e+12 | en-US | 592 | 324 | 21 |
| 7182 | 22435 | The Fabric of the Cosmos: Space Time and the... | Brian Greene | 4.12 | 965900584 | 9.780970e+12 | eng | 569 | 28037 | 762 |
| 7184 | 22438 | The Fabric of the Cosmos: Space Time and the ... | Brian Greene | 4.12 | 736697500 | 9.780740e+12 | eng | 16 | 19 | 5 |
| 10301 | 33418 | Parallel Worlds: A Journey through Creation H... | Michio Kaku | 4.18 | 1400033721 | 9.781400e+12 | eng | 361 | 14613 | 432 |
| 11422 | 38398 | Strings Conformal Fields and M-Theory (Gradu... | Michio Kaku | 4.16 | 387988920 | 9.780390e+12 | eng | 531 | 50 | 1 |
from IPython.display import Image,display
listOfImageNames = ['C:\Kaggle\J._K._Rowling.jpg',
'C:\Kaggle\Tolkien_1916.jpg',
'C:\Kaggle\Stephen_King,_Comicon.jpg']
for imageName in listOfImageNames:
display(Image(filename=imageName))
fantasy_writers=books[(books.authors == "J.K. Rowling")| (books.authors == "J.R.R. Tolkien")| (books.authors == "Stephen King")]
fantasy_writers
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 4 | Harry Potter and the Chamber of Secrets (Harry... | J.K. Rowling | 4.41 | 439554896 | 9.780440e+12 | eng | 352 | 6267 | 272 |
| 7 | 10 | Harry Potter Collection (Harry Potter #1-6) | J.K. Rowling | 4.73 | 439827604 | 9.780440e+12 | eng | 3342 | 27410 | 820 |
| 22 | 30 | J.R.R. Tolkien 4-Book Boxed Set: The Hobbit an... | J.R.R. Tolkien | 4.59 | 345538374 | 9.780350e+12 | eng | 1728 | 97731 | 1536 |
| 23 | 31 | The Lord of the Rings (The Lord of the Rings ... | J.R.R. Tolkien | 4.49 | 618517650 | 9.780620e+12 | eng | 1184 | 1670 | 91 |
| 24 | 32 | The Lord of the Rings (The Lord of the Rings ... | J.R.R. Tolkien | 4.49 | 618346244 | 9.780620e+12 | eng | 1137 | 2819 | 139 |
| 25 | 34 | The Fellowship of the Ring (The Lord of the Ri... | J.R.R. Tolkien | 4.35 | 618346252 | 9.780620e+12 | eng | 398 | 2009749 | 12784 |
| 29 | 38 | The Lord of the Rings Box Set | J.R.R. Tolkien | 4.49 | 618153977 | 9.780620e+12 | eng | 1223 | 216 | 19 |
| 693 | 2002 | Harry Potter Schoolbooks Box Set: Two Classic ... | J.K. Rowling | 4.40 | 043932162X | 9.780440e+12 | eng | 240 | 11459 | 143 |
| 695 | 2005 | Harry Potter and the Half-Blood Prince (Harry ... | J.K. Rowling | 4.56 | 747584664 | 9.780750e+12 | eng | 768 | 1173 | 72 |
| 812 | 2331 | The Lord of the Rings- 3 volumes set (The Lord... | J.R.R. Tolkien | 4.49 | 618574999 | 9.780620e+12 | en-US | 1438 | 233 | 9 |
| 1123 | 3357 | Harry Potter Y La Piedra Filosofal (Harry Pott... | J.K. Rowling | 4.47 | 613359607 | 9.780610e+12 | spa | 254 | 84 | 5 |
| 1429 | 4256 | Harry Potter and the Prisoner of Azkaban (Harr... | J.K. Rowling | 4.55 | 074757362X | 9.780750e+12 | eng | 480 | 3116 | 147 |
| 1711 | 5094 | The Drawing of the Three (The Dark Tower #2) | Stephen King | 4.23 | 451210859 | 9.780450e+12 | eng | 463 | 163647 | 4846 |
| 1712 | 5095 | The Waste Lands (The Dark Tower #3) | Stephen King | 4.24 | 034082977X | 9.780340e+12 | eng | 584 | 1073 | 82 |
| 1714 | 5098 | The Gunslinger (The Dark Tower #1) | Stephen King | 3.96 | 340829753 | 9.780340e+12 | eng | 238 | 1598 | 189 |
| 1840 | 5399 | The Stand | Stephen King | 4.34 | 1568495714 | 9.781570e+12 | eng | 1344 | 412 | 33 |
| 1847 | 5415 | 'Salem's Lot | Stephen King | 4.01 | 965772411 | 9.780970e+12 | eng | 405 | 959 | 121 |
| 1848 | 5416 | The Shining / Salems Lot / Night Shift / Carrie | Stephen King | 4.67 | 905712609 | 9.780910e+12 | eng | 991 | 1838 | 27 |
| 1849 | 5417 | Carrie / 'Salem's Lot / The Shining | Stephen King | 4.53 | 517219026 | 9.780520e+12 | eng | 1096 | 12320 | 58 |
| 1850 | 5418 | 'Salem's Lot | Stephen King | 4.01 | 451150651 | 9.780450e+12 | eng | 446 | 399 | 45 |
| 1851 | 5419 | 'Salem's Lot | Stephen King | 4.01 | 451092317 | 9.780450e+12 | en-US | 427 | 169 | 33 |
| 1852 | 5420 | 'Salem's Lot | Stephen King | 4.01 | 340770538 | 9.780340e+12 | eng | 586 | 24 | 6 |
| 1998 | 5898 | The Lord of the Rings (The Lord of the Rings ... | J.R.R. Tolkien | 4.49 | 7136587 | 9.780010e+12 | eng | 1200 | 680 | 47 |
| 2000 | 5907 | The Hobbit or There and Back Again | J.R.R. Tolkien | 4.26 | 618260307 | 9.780620e+12 | eng | 366 | 2364968 | 31664 |
| 2002 | 5911 | Poems From The Hobbit | J.R.R. Tolkien | 4.32 | 618009345 | 9.780620e+12 | eng | 57 | 165 | 4 |
| 2003 | 5912 | The Hobbit: Or There and Back Again | J.R.R. Tolkien | 4.26 | 1594130051 | 9.781590e+12 | eng | 481 | 274 | 44 |
| 2004 | 5915 | The Hobbit | J.R.R. Tolkien | 4.26 | 261103288 | 9.780260e+12 | eng | 277 | 3158 | 325 |
| 2411 | 7348 | Tree and Leaf: Includes Mythopoeia and The Hom... | J.R.R. Tolkien | 4.09 | 7105045 | 9.780010e+12 | eng | 176 | 2245 | 95 |
| 3393 | 10566 | Lisey's Story | Stephen King | 3.67 | 743289412 | 9.780740e+12 | eng | 513 | 56882 | 2585 |
| 3394 | 10567 | Cell | Stephen King | 3.65 | 1416524517 | 9.781420e+12 | eng | 449 | 163786 | 4231 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 5295 | 15875 | Harry Potter y la cámara secreta (Harry Potter... | J.K. Rowling | 4.41 | 8498380138 | 9.788500e+12 | spa | 288 | 181 | 15 |
| 5296 | 15876 | Harry Potter y la Orden del Fénix (Harry Potte... | J.K. Rowling | 4.49 | 8478888845 | 9.788480e+12 | spa | 893 | 4893 | 397 |
| 5617 | 16694 | The Two Towers (The Lord of the Rings #2) | J.R.R. Tolkien | 4.44 | 618002235 | 9.780620e+12 | eng | 328 | 7687 | 359 |
| 6004 | 17944 | The Gunslinger (The Dark Tower #1) | Stephen King | 3.96 | 451160525 | 9.780450e+12 | eng | 315 | 1826 | 222 |
| 6055 | 18114 | Wizard and Glass (The Dark Tower #4) | Stephen King | 4.25 | 451194861 | 9.780450e+12 | eng | 702 | 864 | 103 |
| 6060 | 18128 | 'Salem's Lot | Stephen King | 4.01 | 671039741 | 9.780670e+12 | eng | 631 | 3386 | 357 |
| 6128 | 18342 | It | Stephen King | 4.23 | 451169514 | 9.780450e+12 | eng | 1090 | 293877 | 6630 |
| 6187 | 18512 | The Return of the King (The Lord of the Rings ... | J.R.R. Tolkien | 4.52 | 345339738 | 9.780350e+12 | eng | 490 | 532629 | 5346 |
| 6400 | 19137 | 'Salem's Lot | Stephen King | 4.01 | 451098277 | 9.780450e+12 | eng | 817 | 14 | 3 |
| 7036 | 22076 | From a Buick 8 | Stephen King | 3.44 | 743211375 | 9.780740e+12 | eng | 356 | 51654 | 1249 |
| 7215 | 22549 | The Dark Tower (The Dark Tower #7) | Stephen King | 4.28 | 340827211 | 9.780340e+12 | eng | 686 | 344 | 38 |
| 7216 | 22550 | The Gunslinger (The Dark Tower #1) | Stephen King | 3.96 | 670032549 | 9.780670e+12 | eng | 231 | 2223 | 222 |
| 7523 | 23603 | Tales from the Perilous Realm | J.R.R. Tolkien | 4.08 | 7149123 | 9.780010e+12 | eng | 178 | 2964 | 147 |
| 8735 | 28097 | Bag of Bones | Stephen King | 3.89 | 034071820X | 9.780340e+12 | eng | 660 | 456 | 40 |
| 10123 | 32667 | Blood and Smoke | Stephen King | 3.92 | 671046179 | 9.780670e+12 | eng | 4 | 6054 | 150 |
| 10124 | 32668 | LT's Theory of Pets | Stephen King | 3.69 | 074352005X | 9.780740e+12 | eng | 1 | 2617 | 127 |
| 10131 | 32691 | Four Past Midnight | Stephen King | 3.92 | 451213599 | 9.780450e+12 | eng | 768 | 1424 | 42 |
| 10132 | 32692 | Gerald's Game | Stephen King | 3.50 | 831727527 | 9.780830e+12 | eng | 332 | 110879 | 2514 |
| 10290 | 33348 | Different Seasons | Stephen King | 4.35 | 708823602 | 9.780710e+12 | en-GB | 560 | 183 | 24 |
| 10519 | 34258 | Harry Potter y la Orden del Fénix (Harry Potte... | J.K. Rowling | 4.49 | 8478887423 | 9.788480e+12 | spa | 896 | 953 | 51 |
| 10987 | 36303 | 'Salem's Lot | Stephen King | 4.01 | 451139690 | 9.780450e+12 | eng | 427 | 176 | 20 |
| 11689 | 39662 | Different Seasons | Stephen King | 4.35 | 751514624 | 9.780750e+12 | eng | 560 | 121420 | 1914 |
| 11690 | 39664 | Rita Hayworth and Shawshank Redemption: A Stor... | Stephen King | 4.52 | 896214400 | 9.780900e+12 | eng | 181 | 15409 | 839 |
| 12253 | 41907 | Harry Potter und die Kammer des Schreckens (Ha... | J.K. Rowling | 4.41 | 3551552096 | 9.783550e+12 | ger | 351 | 25 | 1 |
| 12256 | 41911 | Harry Potter und der Gefangene von Askaban (Ha... | J.K. Rowling | 4.55 | 355155210X | 9.783550e+12 | ger | 448 | 28 | 2 |
| 12257 | 41912 | Harry Potter ve Felsefe Taşı | J.K. Rowling | 4.47 | 3570211010 | 9.783570e+12 | tur | 353 | 12 | 0 |
| 12660 | 43504 | Harry Potter and the Philosopher's Stone (Harr... | J.K. Rowling | 4.47 | 158234681X | 9.781580e+12 | gla | 250 | 11 | 0 |
| 12663 | 43509 | Harry Potter and the Goblet of Fire (Harry Pot... | J.K. Rowling | 4.55 | 074754624X | 9.780750e+12 | eng | 636 | 18097 | 860 |
| 13637 | 47532 | Harry Potter y el prisionero de Azkaban (Harry... | J.K. Rowling | 4.55 | 8478886559 | 9.788480e+12 | spa | 359 | 5582 | 469 |
| 13643 | 47549 | La Torre Oscura (La Torre Oscura #7) | Stephen King | 4.28 | 8401335833 | 9.788400e+12 | spa | 985 | 46 | 5 |
112 rows × 10 columns
romance_writers=books[(books.authors == "Nicholas Sparks")| (books.authors == "Jane Austen")|(books.authors == "Nora Roberts")]
romance_writers
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 338 | 947 | First Impressions | Nora Roberts | 3.74 | 373510055 | 9.780370e+12 | eng | 250 | 31 | 3 |
| 651 | 1888 | Pride and Prejudice | Jane Austen | 4.25 | 192802380 | 9.780190e+12 | eng | 333 | 2369 | 259 |
| 751 | 2153 | Jane Austen: The Complete Novels | Jane Austen | 4.55 | 517118297 | 9.780520e+12 | eng | 1103 | 264 | 24 |
| 1154 | 3462 | The Rescue | Nicholas Sparks | 4.10 | 446696129 | 9.780450e+12 | eng | 352 | 151617 | 3058 |
| 1155 | 3463 | A Bend in the Road | Nicholas Sparks | 4.03 | 446696137 | 9.780450e+12 | eng | 341 | 123319 | 3173 |
| 1156 | 3464 | True Believer (Jeremy Marsh & Lexie Darnell #1) | Nicholas Sparks | 3.80 | 044669651X | 9.780450e+12 | eng | 465 | 66639 | 2374 |
| 1158 | 3466 | The Wedding (The Notebook #2) | Nicholas Sparks | 3.98 | 446615862 | 9.780450e+12 | eng | 276 | 124127 | 5221 |
| 1161 | 3469 | Nights in Rodanthe | Nicholas Sparks | 3.83 | 446691798 | 9.780450e+12 | en-US | 212 | 1570 | 158 |
| 1162 | 3471 | Message in a Bottle | Nicholas Sparks | 3.96 | 446606812 | 9.780450e+12 | en-GB | 370 | 2714 | 224 |
| 1163 | 3473 | A Walk to Remember | Nicholas Sparks | 4.16 | 446693804 | 9.780450e+12 | eng | 240 | 555926 | 10210 |
| 1165 | 3478 | Message in a Bottle | Nicholas Sparks | 3.96 | 446676071 | 9.780450e+12 | eng | 342 | 197377 | 3431 |
| 1536 | 4615 | Pride and Prejudice | Jane Austen | 4.25 | 140620222 | 9.780140e+12 | eng | 299 | 1852 | 190 |
| 1891 | 5526 | Dear John | Nicholas Sparks | 4.03 | 446528056 | 9.780450e+12 | eng | 276 | 485405 | 9539 |
| 4986 | 14905 | The Complete Novels | Jane Austen | 4.55 | 140259449 | 9.780140e+12 | eng | 1344 | 20062 | 355 |
| 4987 | 14909 | Jane Austen's Letters | Jane Austen | 4.15 | 1414500084 | 9.781410e+12 | en-US | 112 | 42 | 5 |
| 4988 | 14911 | Pride and Prejudice | Jane Austen | 4.25 | 070898228X | 9.780710e+12 | eng | 533 | 18 | 5 |
| 4989 | 14913 | The Complete Novels of Jane Austen Vol 1: Sen... | Jane Austen | 4.52 | 679600264 | 9.780680e+12 | eng | 898 | 241 | 22 |
| 4993 | 14927 | Emma | Jane Austen | 3.99 | 1587263963 | 9.781590e+12 | en-US | 424 | 83 | 6 |
| 5316 | 15924 | At First Sight (Jeremy Marsh & Lexie Darnell #2) | Nicholas Sparks | 3.82 | 446698466 | 9.780450e+12 | eng | 204 | 66386 | 3038 |
| 5317 | 15925 | The Guardian | Nicholas Sparks | 4.15 | 446696110 | 9.780450e+12 | eng | 400 | 144654 | 4103 |
| 5318 | 15926 | Nights in Rodanthe | Nicholas Sparks | 3.83 | 446612707 | 9.780550e+12 | eng | 222 | 137905 | 3499 |
| 5320 | 15931 | The Notebook (The Notebook #1) | Nicholas Sparks | 4.08 | 553816713 | 9.780550e+12 | eng | 214 | 1090301 | 15327 |
| 5321 | 15936 | At First Sight | Nicholas Sparks | 3.82 | 073945868X | 9.780740e+12 | eng | 466 | 92 | 13 |
| 5322 | 15937 | À tout jamais | Nicholas Sparks | 4.16 | 2266111108 | 9.782270e+12 | fre | 214 | 166 | 21 |
| 5323 | 15941 | Zeit im Wind / Das Schweigen des Glücks. Zwei ... | Nicholas Sparks | 4.27 | 3453871235 | 9.783450e+12 | ger | 624 | 73 | 2 |
| 5324 | 15943 | A Walk to Remember | Nicholas Sparks | 4.16 | 739404911 | 9.780740e+12 | eng | 249 | 34 | 4 |
| 5327 | 15950 | Weit wie das Meer | Nicholas Sparks | 3.96 | 345313849X | 9.783450e+12 | ger | 303 | 4 | 0 |
| 5331 | 15956 | True Believer | Nicholas Sparks | 3.80 | 446532436 | 9.780450e+12 | en-US | 322 | 857 | 77 |
| 5959 | 17781 | Heart of the Sea (Gallaghers of Ardmore / Iris... | Nora Roberts | 4.15 | 515128554 | 9.780520e+12 | eng | 369 | 23839 | 514 |
| 8292 | 26046 | Morrigan's Cross (Circle Trilogy #1) | Nora Roberts | 4.14 | 515141658 | 9.780520e+12 | eng | 321 | 45372 | 1135 |
| 8293 | 26047 | Rebellion (The MacGregors #0.1) | Nora Roberts | 3.91 | 373285434 | 9.780370e+12 | eng | 395 | 6462 | 140 |
| 8294 | 26048 | Dream Makers: Untamed / Less of a Stranger | Nora Roberts | 3.81 | 373285248 | 9.780370e+12 | eng | 411 | 966 | 32 |
| 8295 | 26049 | Spellbound (Once Upon #1) | Nora Roberts | 3.80 | 515140775 | 9.780520e+12 | eng | 96 | 6695 | 159 |
| 8296 | 26050 | Angels Fall | Nora Roberts | 3.99 | 399153721 | 9.780400e+12 | eng | 391 | 36535 | 1015 |
| 8297 | 26051 | True Betrayals / Montana Sky / Sanctuary | Nora Roberts | 4.40 | 399147314 | 9.780400e+12 | eng | 852 | 660 | 5 |
| 8298 | 26052 | First Impressions | Nora Roberts | 3.73 | 373285388 | 9.780370e+12 | eng | 301 | 5438 | 288 |
| 8299 | 26053 | Public Secrets | Nora Roberts | 4.02 | 553589474 | 9.780550e+12 | eng | 481 | 10769 | 407 |
| 8300 | 26054 | The MacGregors: Serena & Caine (The MacGregors... | Nora Roberts | 4.09 | 373285132 | 9.780370e+12 | eng | 441 | 10929 | 147 |
| 8301 | 26055 | The MacGregors: Alan & Grant (The MacGregors ... | Nora Roberts | 4.11 | 037328523X | 9.780370e+12 | eng | 458 | 9300 | 87 |
| 9715 | 31313 | Dance of the Gods (Circle Trilogy #2) | Nora Roberts | 4.14 | 515141666 | 9.780520e+12 | eng | 321 | 24552 | 564 |
| 9827 | 31692 | The Complete Novels of Jane Austen | Jane Austen | 4.55 | 1840220554 | 9.781840e+12 | eng | 1431 | 924 | 28 |
| 11226 | 37546 | Persuasion | Jane Austen | 4.13 | 812565886 | 9.780810e+12 | eng | 242 | 1528 | 58 |
| 11915 | 40491 | Valley Of Silence (Circle Trilogy #3) | Nora Roberts | 4.22 | 515141674 | 9.780520e+12 | eng | 318 | 1344 | 112 |
| 11924 | 40528 | Time and Again (Time Travel #1-2) | Nora Roberts | 3.76 | 373285337 | 9.780370e+12 | eng | 505 | 295 | 31 |
| 11925 | 40530 | Time and Again: Time Was / Times Change | Nora Roberts | 3.76 | 373484410 | 9.780370e+12 | eng | 505 | 7434 | 183 |
| 12244 | 41885 | Sense and Sensibility | Jane Austen | 4.07 | 1593081251 | 9.781590e+12 | eng | 325 | 1199 | 144 |
| 13025 | 45041 | Mansfield Park | Jane Austen | 3.85 | 755331478 | 9.780760e+12 | eng | 454 | 136 | 17 |
| 13026 | 45046 | Mansfield Park | Jane Austen | 3.85 | 140620664 | 9.780140e+12 | eng | 479 | 488 | 52 |
from IPython.display import Image,display
listOfImageNames = [ r'C:\Kaggle\NicholasSparks.jpg',
r'C:\Kaggle\NoraRoberts.jpg',
r'C:\Kaggle\JaneAusten.jpg']
for imageName in listOfImageNames:
display(Image(filename=imageName))
classic_writers=books[(books.authors == "William Shakespeare")| (books.authors == "Charles Dickens")|(books.authors == "Mark Twain")]
classic_writers
| bookID | title | authors | average_rating | isbn | isbn13 | language_code | # num_pages | ratings_count | text_reviews_count | |
|---|---|---|---|---|---|---|---|---|---|---|
| 476 | 1419 | The Complete Works | William Shakespeare | 4.49 | 517092948 | 9.780520e+12 | eng | 1248 | 62 | 6 |
| 577 | 1625 | Twelfth Night | William Shakespeare | 3.98 | 743482778 | 9.780740e+12 | eng | 220 | 133832 | 2321 |
| 670 | 1952 | A Tale of Two Cities | Charles Dickens | 3.83 | 486406512 | 9.780490e+12 | eng | 293 | 901 | 74 |
| 682 | 1982 | Charles Dickens: Four Novels: Great Expectati... | Charles Dickens | 4.29 | 517093391 | 9.780520e+12 | en-US | 848 | 31 | 2 |
| 842 | 2443 | The Innocents Abroad | Mark Twain | 3.86 | 812967054 | 9.780810e+12 | eng | 560 | 8540 | 663 |
| 1018 | 2965 | The Wit and Wisdom of Mark Twain | Mark Twain | 4.20 | 486406644 | 9.780490e+12 | eng | 64 | 934 | 51 |
| 1805 | 5328 | A Christmas Carol | Charles Dickens | 4.04 | 1580495796 | 9.781580e+12 | eng | 112 | 6415 | 444 |
| 1810 | 5342 | The Life of Our Lord: Written for His Children... | Charles Dickens | 4.00 | 684865378 | 9.780680e+12 | eng | 128 | 1652 | 346 |
| 1811 | 5344 | Hard Times | Charles Dickens | 3.52 | 321107217 | 9.780320e+12 | eng | 353 | 39387 | 1588 |
| 1921 | 5661 | Holiday Romance and Other Writings for Children | Charles Dickens | 3.34 | 460876015 | 9.780460e+12 | eng | 368 | 8 | 3 |
| 2299 | 7006 | Hamlet | William Shakespeare | 4.01 | 1411400429 | 9.781410e+12 | eng | 352 | 8 | 2 |
| 2301 | 7009 | A Midsummer Night's Dream | William Shakespeare | 3.94 | 451526961 | 9.780450e+12 | eng | 162 | 2151 | 95 |
| 3042 | 9512 | Measure for Measure | William Shakespeare | 3.67 | 014101380X | 9.780140e+12 | eng | 224 | 55 | 4 |
| 3386 | 10551 | The Christmas Books of Charles Dickens: A Chri... | Charles Dickens | 4.13 | 681984112 | 9.780680e+12 | eng | 455 | 35 | 3 |
| 3388 | 10553 | Stories for Christmas | Charles Dickens | 4.21 | 1879582414 | 9.781880e+12 | eng | 792 | 468 | 22 |
| 4260 | 12938 | King Lear | William Shakespeare | 3.90 | 074348276X | 9.780740e+12 | eng | 316 | 148902 | 2663 |
| 4280 | 12982 | Twelfth Night | William Shakespeare | 3.98 | 141014709 | 9.780140e+12 | en-GB | 240 | 190 | 19 |
| 4286 | 12996 | Othello | William Shakespeare | 3.88 | 743477553 | 9.780740e+12 | eng | 314 | 261813 | 3996 |
| 6069 | 18139 | Romeo and Juliet | William Shakespeare | 3.74 | 764120859 | 9.780760e+12 | eng | 304 | 686 | 39 |
| 6095 | 18251 | Great Expectations | Charles Dickens | 3.76 | 140620168 | 9.780140e+12 | eng | 443 | 889 | 61 |
| 6096 | 18255 | Oliver Twist | Charles Dickens | 3.86 | 486424537 | 9.780490e+12 | eng | 368 | 2062 | 80 |
| 7837 | 24580 | The Adventures of Tom Sawyer & Adventures of H... | Mark Twain | 4.08 | 451528646 | 9.780450e+12 | eng | 520 | 32742 | 451 |
| 9689 | 31244 | Our Mutual Friend | Charles Dickens | 4.07 | 375761144 | 9.780380e+12 | eng | 801 | 21543 | 916 |
| 10021 | 32400 | Henry IV part II | William Shakespeare | 3.80 | 141016701 | 9.780140e+12 | eng | 336 | 20 | 4 |
| 10054 | 32484 | The Necessary Shakespeare | William Shakespeare | 4.33 | 321272501 | 9.780320e+12 | eng | 896 | 90 | 10 |
| 10205 | 32966 | The Merchant of Venice | William Shakespeare | 3.80 | 141013958 | 9.780140e+12 | eng | 240 | 135 | 6 |
| 11312 | 37815 | Mark Twain: Selected Works | Mark Twain | 4.28 | 517053578 | 9.780520e+12 | eng | 690 | 40 | 1 |
| 11508 | 38680 | Adventures of Huckleberry Finn | Mark Twain | 3.81 | 440300282 | 9.780440e+12 | eng | 352 | 90 | 2 |
| 12295 | 42040 | Love Poems and Sonnets | William Shakespeare | 4.34 | 385017332 | 9.780390e+12 | eng | 160 | 5625 | 63 |
| 12404 | 42593 | Romeo & Juliet | William Shakespeare | 3.74 | 844257478 | 9.780840e+12 | eng | 242 | 92 | 11 |
| 12410 | 42607 | As You Like It | William Shakespeare | 3.83 | 074348486X | 9.780740e+12 | eng | 263 | 60771 | 1211 |
| 13209 | 45641 | Las aventuras de Tom Sawyer | Mark Twain | 3.91 | 8497646983 | 9.788500e+12 | spa | 272 | 105 | 12 |
| 13538 | 47018 | King Lear | William Shakespeare | 3.90 | 141012293 | 9.780140e+12 | eng | 279 | 180 | 12 |
from IPython.display import Image,display
listOfImageNames = [ r'C:\Kaggle\Shakespeare.jpg',
r'C:\Kaggle\Dickens_Gurney_head.jpg',
r'C:\Kaggle\Twain.jpg']
for imageName in listOfImageNames:
display(Image(filename=imageName))
science=scientist_writer[['average_rating']]
science=science.rename(columns = {"average_rating": "average_rating_science"})
fantasy=fantasy_writers[['average_rating']]
fantasy=fantasy.rename(columns = {"average_rating": "average_rating_fantasy"})
romance=romance_writers[['average_rating']]
romance=romance.rename(columns = {"average_rating": "average_rating_romance"})
classic=classic_writers[['average_rating']]
classic=classic.rename(columns = {"average_rating": "average_rating_classic"})
comb=pd.concat([science,fantasy,romance,classic],sort='False')
comb.describe()
comb_summary=comb.describe().transpose()
comb_summary['std'].plot(kind='bar',stacked=True,title="standard devaition of categories of book")
<matplotlib.axes._subplots.AxesSubplot at 0x241141ee780>
corr=books.corr()
corr.iloc[1,3:6]
# num_pages 0.167388 ratings_count 0.041234 text_reviews_count 0.036695 Name: average_rating, dtype: float64
from scipy.stats import spearmanr
s_corr=spearmanr(books['average_rating'],books['text_reviews_count'])
s_corr
SpearmanrResult(correlation=0.029038991783090353, pvalue=0.0006712256760556977)